﻿/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2012-2018. All rights reserved.
 * Description:
 * Author: 辛爱国 x30005137
 * Create: 2020-07-28
 * Notes: 无
 */
#include "upgradedialog.h"
#include <QGraphicsDropShadowEffect>
#include <QDesktopServices>

Upgradedialog::Upgradedialog(QWidget *parent) : HWDialog(parent)
{
    setupUi(this);
    setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog | Qt::WindowStaysOnTopHint);
    this->setAttribute(Qt::WA_TranslucentBackground);
    QGraphicsDropShadowEffect *shadow_effect = new QGraphicsDropShadowEffect(this);
    shadow_effect->setOffset(0, 0);
    shadow_effect->setColor(Qt::gray);
    shadow_effect->setBlurRadius(10);            // 设置阴影参数半径10
    this->widgetWindow->setGraphicsEffect(shadow_effect);
    this->labelUpdateLogo->setScaledContents(true);
    this->labelUpdateLogo->setPixmap(QPixmap(":/image/images/100.png"));
    saveChildrenInfo();
}
Upgradedialog::~Upgradedialog() {}

void Upgradedialog::on_pushButtonCancel_clicked()
{
    hide();
}
void Upgradedialog::on_pushButtonExit_clicked()
{
    hide();
}

void Upgradedialog::on_pushButtonOK_clicked()
{
    //QDesktopServices::openUrl(QUrl(ideasharesdk::config::upgradeurl.value().c_str()));
    hide();
}
